package com.lhb.SC.admin.web;

import com.lhb.SC.admin.feign.OssFeign;
import com.lhb.SC.web.context.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/oss")
public class OssController {

    @Autowired
    private OssFeign ossFeign;

    @RequestMapping("/upload/file")
    public ResponseResult<Object> handleFileUpload(@RequestPart("file") MultipartFile[] files) {

        return ossFeign.handleFileUpload(files);
    }
}
